Maker : CADTEK
"C:\AtmechPro\AtmSystem\acad.lsp"
;acad.lsp for AUTO-MECHANIC PRO HMC Ver.(2019) ;Copyright (c) CADTEK All rights Reserved (setvar "cmdecho" 0) (load "AtmRunPart") ;; manu 나 command 에서 실행할 경우 명령어 (defun c:atmech() (load "AtmProSystem")Syatem file load (DCL 포함) (arxload "acetutil") (command "-STYLE" "돋움" "돋움체" 0.0 "" "" "" "") (command "-STYLE" "WHGTXT" "txt,WHGTXT" 0.0 "" "" "" "" "") ) ;defun (c:atmech);;;(c:atmech) 하면 C:\AtmProPrg\에서 프로그램 편집가능 (princ)
(if (/= debugging_password "ljg") (if (= (member atm_cmd1 (atoms-family 0)) nil) (load fas_file_name) ) ;_ end of if )
"(/= debugging_password "ljg")"이면 C:\AtmechPro\ 아래의 프로그램을 실행한다.
프로그램을 작성할려면 (setq debugging_password "ljg") 로 설정해야 됩니다
"(load_dialog "AtmXXX")"DCL 은 지원파일 검색경로에 있어야만 Loading 할수 있습니다
따라서 프로그램 편집을 할려면 "C:\AtmProPrg \ AtmSyatem \ "을 지원파일 검색경로에 Setting 하여야 한다.
프로그램 배포용은
(:target . "C:/AtmechPro/AtmSystem/AtmProSystem.vlx") 에 포함되어 컴파일 되었습니다.
AutoCAD 에서 "명령: VLIDE"Visual Lisp 편집기를 열어 주세요
편집기의 상부 Pull-Down 메뉴에서 AutoCAD 에서
프로잭트(P) ⇒ 프로잭트 열기(O)에서 ⇒ AtmProSystem.prj 을 Open 하세요
추가로 편집할려는 LISP 파일이 있는 "프로잭트 파일 "을 Open 후
위의 2종류의 원본파일을 로드하세요,
(프로젝트 창의 메뉴에서 화살표가 아래로 되어있는 버튼)
AtmProSystem.prj 창의 최하단의 파일의 상단에 있는 Atmautorun을 더블클릭하여 열고
최상단의(setq debugging_password "ljg")를 visual Lisp Consol 창에 copy enter로 실행하세요
추가로 편집할려는 LISP 파일의 상단에 있는 (*Atmfun_autoload "xxx")를 visual Lisp Consol 창에 copy enter로 실행하세요
;;;; (*Atmfun_autoload "Bolt&KS&KSB1003") ;;;; (*Atmfun_autoload "Bolt&KS&KSB1002") ;;;; (*Atmfun_autoload "Bolt&KS&KSB1038") ;;;; (*Atmfun_autoload "Bolt&KS&KSV3032") ;;;; (*Atmfun_autoload "Bolt&KS&KSB1033")
위의 파일은 "C:/AtmechPro/AtmSystem/AtmRunPart.lsp" 에서 확인할수 있으며
Menu 파일의 실행 함수도 포함되어 있습니다
acad.lsp 파일은 AutoCAD가 시작될 때 항상 로드된다. 도면이 열릴 때마다 acaddoc.lsp 파일이 실행된다. acad.lsp에서 특수 함수 S::STARTUP이 정의된 경우 이 함수가 실행된다.
예제
예를 들어, AutoCAD를 실행할 때마다 로드되는 stair.lsp와 wall.lsp라는 두 개의 AutoLISP 루틴이 있다.
이 경우, 다음 코드 행을 포함하는 acad.lsp 파일을 작성하여 AutoCAD 지원 경로에 배치하십시오.
(defun s::startup () (load "STAIR.LSP") (load "WALL.LSP") )
wall.lsp 및 stair.lsp가 AutoCAD 검색 경로에 있으면 자동으로 로드된다. AutoLISP 루틴이 AutoCAD 지원 경로에 없는 경우 acad.lsp 파일 내에 전체 경로를 포함한다. "/" 또는 "\\"를 경로 구분 기호로 사용한다.
같은 예제에서 acad.lsp 파일은 다음과 같이 나타납니다.
(defun s::startup () (load "C:/PROG/LISP/STAIR.LSP") (load "C:\\PROG\\LISP\\WALL.LSP") )
S::STARTUP 함수가 이와 같이 정의된 경우 다른 응용프로그램(예를 들어, 타사 플러그인)에서도 S::STARTUP 함수를 사용하면 문제가 발생할 수 있다. 호환성을 보장하려면 기존 S::STARTUP 함수가 있는 경우 코드를 추가하십시오.
이렇게 하려면 다음 코드를 추가한다.
(defun mystartup () (load "C:/PROG/LISP/STAIR.LSP") (load "C:\\PROG\\LISP\\WALL.LSP") ) (if s::startup (setq s::startup (append s::startup (quote ((mystartup))))) (defun s::startup () (mystartup)) )